﻿@model Irandeb4.Models.User

@{
    ViewBag.Title = "Register";
}

<h2>Crear Cuenta</h2>

<p>
     El Passwords debe tener como minimo @Membership.MinRequiredPasswordLength caracteres.
</p>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    <p>El password debe ser alfanumerico con porlomenos un caracter especia</p>
    @Html.ValidationSummary(true, "La creacion de la cuenta no fue realizada. Por favor corrija los errores y vuelva a intentarlo.")
    <fieldset>
        <legend>Datos</legend>
            <fieldset>
                <legend>Informacion Cuenta</legend>
                <table>
                    <tr>
                        <td>
                            *@Html.LabelFor(m => m.UserName):
                        </td>
                        <td>
                            @Html.TextBoxFor(m => m.UserName)
                            @Html.ValidationMessageFor(m => m.UserName)
                        </td>
                    </tr>
                    <tr>
                        <td>
                            *@Html.LabelFor(m => m.Email):
                        </td>
                        <td>
                            @Html.TextBoxFor(m => m.Email)
                            @Html.ValidationMessageFor(m => m.Email)
                        </td>
                    </tr>
                    <tr>
                        <td>
                            *@Html.LabelFor(m => m.Password):
                        </td>
                        <td>
                            @Html.PasswordFor(m => m.Password)
                            @Html.ValidationMessageFor(m => m.Password)
                        </td>
                    </tr>
                    <tr>
                        <td>
                           *@Html.LabelFor(m => m.ConfirmPassword):
                        </td>
                        <td>
                            @Html.PasswordFor(m => m.ConfirmPassword)
                            @Html.ValidationMessageFor(m => m.ConfirmPassword)
                        </td>
                    </tr>

                    <tr>
                        <td>
                            *@Html.LabelFor(m => m.UserRole):
                        </td>
                        <td class="editor-field">
                            @Html.DropDownList("UserRoleId",string.Empty)
                            @Html.ValidationMessageFor(m => m.UserRoleId)
                        </td>
                    </tr>
                </table>
            </fieldset>

            <br/>
            @Html.EditorFor(m => m.Employee)
            @Html.ValidationMessageFor(m => m.Employee)
            
            <div align="right">
                <br/>
                    <input type="submit" value="Registar" />
            </div>
    </fieldset>
}
